<template>
  <div id="app">
  <keep-alive>
    <transition :name="aniType">
      <router-view></router-view>
    </transition>
  </keep-alive>
  </div>
</template>

<script>
export default {
  data:function(){
    return {
      aniType:""
    }
  },
  watch:{
              $route:function(nv,ov){
                  var nCount = nv.path.split("/").length-1;
                  var oCount = ov.path.split("/").length-1;
                  if(nCount>oCount){
                      this.aniType = "inpage";
                  }else if(nCount<oCount){
                      this.aniType = "outpage";
                  }else{
                      this.aniType = "";
                  }
              }
          }
}
</script>

<style>
</style>
